refactor: extract shared helper for useHashes env-var boilerplate#27031
refactor: extract shared helper for useHashes env-var boilerplate#27031tylerbutler wants to merge 2 commits into
Conversation
🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (53 lines, 1 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Pull request overview
Refactors fluid-build leaf tasks to remove repeated useHashes env-var boilerplate by introducing a single helper that encapsulates the “enable hashing via env var == '1'” behavior.
Changes:
- Added
isHashingEnabled(envVar)helper (with consolidated JSDoc) for env-var controlled hashing. - Updated
CopyfilesTask,TypeValidationTask,GoodFence, andDepCruiseTaskto delegateuseHashesto the helper.
Fleet Review — CleanNo issues found across the reviewer fleet for this run. |
Summary
isHashingEnabled(envVar)helper function to eliminate repeated multi-line JSDoc +useHashesgetter boilerplate across 4LeafWithFileStatDoneFileTasksubclasses (CopyfilesTask,TypeValidationTask,GoodFence,DepCruiseTask)useHashesgetter is now a one-liner delegating to the helperFixes #26802
Test plan
pnpm buildpasses inbuild-tools/packages/build-toolspnpm testpasses (137 tests) inbuild-tools/packages/build-tools